package ooday05;

import java.util.Arrays;

//简单版枚举的测试类
public class EnumTest {
    public static void main(String[] args) {
       Seasons s =  Seasons.SPRING;//获取SPRING对象
       switch (s) {
           case AUTUMN:
               System.out.println("秋天");
               break;
           case SPRING:
               System.out.println("春天");
               break;
           case SUMMER:
               System.out.println("夏天");
               break;
           case WINTER:
               System.out.println("冬天");
               break;
       }
       Seasons[] seasons = Seasons.values();//获取所有枚举对象
        System.out.println(Arrays.toString(seasons));
        for (Seasons seasons1 : seasons) {
            System.out.print(seasons1+" ");
        }
    }
}
